SSCC: A Software Tool Based on Extended Ordered Attribute Grammars

نویسندگان

  • WUU YANG
  • YEN-TSAN LIU
چکیده

Attribute grammars are a formalism for specifying computations on syntax trees. SSCC (a Sufficiently Smart Compiler Compiler) is a practical attribute-grammar system based on a polynomial-time extension to Kastens’s ordered attribute grammars. The new class of attribute grammars is strictly larger than the class of ordered attribute grammars, and it retains the property that there is a polynomial-time procedure for finding an evaluation order. The SSCC system is comprised of two subsystems. The generation subsystem computes the evaluation order of attribute occurrences in production rules and translates attribute equations into low-level code for a virtual stack machine. The evaluation subsystem invokes tools to perform lexical and syntactic analyses and evaluates the attribute instances during a traversal of the syntax tree. Three features make SSCC capable of performing any desired computation (within the constraints of ordered attribute grammars): user-defined data types, user-defined functions and data structures, and the finalize function. A user may define arbitrary types and functions for use in the attribution equations. After all the attribute instances are evaluated, SSCC calls the finalize function, which may be supplied by a user, and passes it the whole decorated syntax tree. This offers a user opportunities for further processing of the tree and the attributes. The SSCC system is semi-strongly typed in the sense that type consistency within a specification is fully checked by SSCC; however, type consistency between a specification and user-supplied functions is not checked.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

SSCC: A Sufficiently Smart Compiler-Compiler

Attribute grammars are a formalism for specifying computations on syntax trees. SSCC is a practical attribute-grammar system based on a polynomial-time extension of Kastens’s ordered attribute grammars. The system comprises of two subsystems. The generation subsystem computes the evaluation order of attribute occurrences in production rules and translates attribute equations into low-level code...

متن کامل

A Framework for Optimal Attribute Evaluation and Selection in Hesitant Fuzzy Environment Based on Enhanced Ordered Weighted Entropy Approach for Medical Dataset

Background: In this paper, a generic hesitant fuzzy set (HFS) model for clustering various ECG beats according to weights of attributes is proposed. A comprehensive review of the electrocardiogram signal classification and segmentation methodologies indicates that algorithms which are able to effectively handle the nonstationary and uncertainty of the signals should be used for ECG analysis. Ex...

متن کامل

Efficient Evaluation of Well-Formed Attribute Grammars And Beyond

This paper is concerned with the evaluation of well-formed attribute grammars as support for semantic analysis. This is the largest class of attribute grammars, which does not impose any restrictions. A data structure and an algorithm are described which are efficient, both in terms of space and time. Attribute grammars are extended from the decoration of trees to the decoration of graphs and t...

متن کامل

Attribute Evaluation using Neighbour Functions

Design and implementation of attribute evaluators has received considerable attention ever since Knuth formulated the concept of attribute grammars. In particular, the class of Ordered Attribute Grammars (OAGs) has been of particular interest because practical and efficient attribute evaluators can been implemented based on the statically determined fixed plans for such grammars. Two main categ...

متن کامل

Incremental Evaluation of Ordered Attribute Grammars for Asynchronous Subtree Replacements

Incremental algorithms for evaluating attribute grammars (AGs) have been extensively studied in recent years, primarily because of their application in language-based environments. Ordered attribute grammars are a subclass of AGs for which efficient evaluators can be constructed. Previous incremental algorithms for ordered attribute grammars only allowed one modification 10 the program at a tim...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1987